<?php
require_once(dirname(__FILE__)."/config.php");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $cfg_soft_lang; ?>">
<title>留言查看/处理</title>
<link href="css/base.css" rel="stylesheet" type="text/css">
<?php
$dsql->Execute('f', 'SELECT * FROM #@__message where id='.$_GET['id'].'');
$info = $dsql->GetArray('f');
if($_POST['go']<>"")
{
$uid=$_POST["uid"];
$query = "update #@__message set `datetime`=now(),`chuli`=0 where id='$uid'";
$dsql->ExecuteNoneQuery($query);
ShowMsg('处理成功！','message_main.php?page='.$_GET["page"]);
exit();
}
?>
</head>
<body background='images/allbg.gif' leftmargin='8' topmargin='8'>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#D6D6D6">
  <tr>
    <td height="19" background="images/tbg.gif" style="padding-left:10px;"><a href='message_main.php'><b>留言列表</b></a> &gt;&gt; 查看</td>
</tr>
<tr>
<td height="200" bgcolor="#FFFFFF" align='center'>
	<table width="98%" border="0" cellspacing="0" cellpadding="6" >
        <tr> 
          <td colspan="2" height="10" ></td>
        </tr>
        <form name="myform" action="" method="post">
          <input type="hidden" value="<?php echo $info['id']?>" name="uid" />
          <tr> 
            <td width="17%" align="right" class='bline'>来源：</td>
            <td width="83%" class='bline' style="text-align:left; color:#f30;"> 
             <?php echo $info['laiyuan']?>
             </td>
          </tr>
          <tr> 
            <td width="17%" align="right" class='bline'>姓名：</td>
            <td width="83%" class='bline' style="text-align:left; color:#f30;"> 
             <?php echo $info['username']?>
             </td>
          </tr>
          <tr> 
            <td align="right" class='bline'>性别：</td>
            <td class='bline' style="text-align:left;color:#f30;"> 
            <?php echo $info['sex']?>
             </td>
          </tr>
          <tr> 
            <td align="right" class='bline'>手机：</td>
            <td class='bline' style="text-align:left;color:#f30;"> 
            <?php echo $info['shouji']?>
             </td>
          </tr>
          <tr> 
            <td align="right" class='bline'>来源IP：</td>
            <td class='bline' style="text-align:left;color:#f30;">
            <?php echo $info['ip']?>
            </td>
          </tr>
          <tr> 
            <td align="right" class='bline'>提交时间：</td>
            <td class='bline' style="text-align:left;color:#f30;">
            <?php echo $info['dtime']?>
            </td>
          </tr>
          <tr> 
            <td align="right" class='bline'>处理时间：</td>
            <td class='bline' style="text-align:left;color:#f30;">
             <?php if($info['datetime']==""){echo "未处理";}else{echo $info['datetime'];}?>
            </td>
          </tr>
          <tr> 
            <td align="right" class='bline'>是否处理：</td>
            <td class='bline' style="text-align:left;color:#f30;">
            <?php if($info['chuli']==1){echo "<samp style='color:#CC9900'>未处理</samp>";}else{ echo "<samp style='color:#ff3300'>已处理</samp>";}?>
            </td>
          </tr>
          <tr> 
            <td height="67" align="right" >&nbsp;</td>
            <td height="67" align="left">
            <?php if($info['chuli']==1){?>
            <input type="submit" name="go" id="go" value="处理预约" class='coolbg' /><?php }?>
            <input type="button" value="返回" onclick="javascript:history.go(-1);" class='coolbg'/>
            </td>
          </tr>
        </form>
    </table>
    </td>
</tr>
</table>
<?php
mysql_close();
?>
</body>
</html>